home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / BBS-Archive / Comm / AmiTCP30b2.lha / netinclude / lineread.h < prev    next >
C/C++ Source or Header  |  1993-08-12  |  1KB  |  67 lines

  1. /*
  2.  * lineread.h
  3.  * 
  4.  * Author: Tomi Ollila <too@cs.hut.fi>
  5.  * 
  6.  * This module is FREEWARE. Standard "NO WARRANTY" disclaimer applies.
  7.  *
  8.  * Created: Fri Nov 29 03:23:03 1991 too
  9.  * Last modified: Wed Jul  7 20:42:54 1993 too
  10.  * 
  11.  * $Id: lineread.h,v 1.2 1993/07/07 17:45:36 too Exp $
  12.  *
  13.  * HISTORY
  14.  * $Log: lineread.h,v $
  15.  * Revision 1.2  1993/07/07  17:45:36  too
  16.  * Made lineread compile without using sys/cdefs.h (only w/ ANSI compilers)
  17.  *
  18.  * Revision 1.1  1993/06/16  16:41:04  too
  19.  * Initial revision
  20.  *
  21.  *
  22.  */
  23.  
  24. #ifndef LINEREAD_H
  25. #define LINEREAD_H
  26.  
  27. /* #include <sys/cdefs.h> */
  28.  
  29. #ifndef RL_BUFSIZE
  30. #define RL_BUFSIZE 1024
  31. #endif
  32.  
  33. struct rl_private {
  34. /*  struct Library * rlp_SocketBase; */
  35.   int        rlp_Startp;
  36.   int        rlp_Bufpointer;
  37.   int        rlp_Howlong;
  38.   int         rlp_Buffersize;
  39. #define bool int
  40.   bool         rlp_Line_completed;
  41.   bool         rlp_Selected;
  42. #undef bool  
  43.   char       rlp_Saved;
  44.   char       rlp_Buffer[RL_BUFSIZE + 1];
  45. };
  46.  
  47. struct LineRead {
  48.   char *                            rl_Line;
  49.   enum {RL_LFNOTREQ = 0, RL_LFREQLF = 1, RL_LFREQNUL = 2}    rl_Lftype;
  50.   int                                rl_Fd;
  51.   struct rl_private                        rl_Private;
  52. };
  53.  
  54. /*__BEGIN_DECLS
  55.   
  56. int    lineRead __P((struct LineRead * rl));
  57. void    initLineRead __P((struct LineRead * rl, int fd,
  58.               int lftype, int buffersize));
  59.  
  60. __END_DECLS */
  61.  
  62. int    lineRead (struct LineRead * rl);
  63. void    initLineRead (struct LineRead * rl, int fd,
  64.               int lftype, int buffersize);
  65.  
  66. #endif /* LINEREAD_H */
  67.